package cn.itcast.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 控制器类
 */
@Controller
@RequestMapping(path = "/user")
public class HelloController {

    @RequestMapping(path = "/hello")
    public  String sayHello(){
        System.out.println("Hello SpringMVC");
        return "success";
    }

    @RequestMapping(path = "/nihao")
    public String sayNihao(){
        System.out.println("你好");
        return "nihao";
    }

    /**
     *
     * @return
     */
    @RequestMapping(path = "/testRequestMapping",params = {"username"})
    public  String testRequestMapping(){
        System.out.println("测试RequestMapping注解....");
        return "success";
    }

}
